﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class manage_mange_Add : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

    }
    protected void Button1_Click(object sender, EventArgs e)
    {
        DataClassesDataContext db = new DataClassesDataContext();
        tb_Admin  mange= new tb_Admin
        {
            AdminName=TextBox1.Text.ToString(),
            Password=TextBox2.Text.ToString(),
            RealName=TextBox3.Text.ToString(),
            LoadDate=DateTime.Now.ToLocalTime(),
            phone=TextBox4.Text.ToString()
        };
        db.tb_Admin.InsertOnSubmit(mange);
        db.SubmitChanges();
        Response.Write("<script>alert('成功添加管理员！')</script>");
    }
    protected void Button2_Click(object sender, EventArgs e)
    {

    }
    public void Reset()
    {
        TextBox1.Text = "";
        TextBox2.Text = "";
        TextBox3.Text = "";
    }
}